<%@ include file="html_start.jsp"%>



<%-- Redirected because we can't set the welcome page to a virtual URL. --%>
<div align="center">
<form action="search.do" method="get">Find <input
	type="text" name="query"> <input type="submit" value="Go">
</form>
</div>

<h1 align="center">
	<c:if test="${not empty searchResults}">
		<c:out value="${searchResults}" />
	</c:if>
</h1>
<table id="mainTable" border="1 px" align="center">
	<tr>
		<th align="center"><span style="vertical-align:middle;">Card Name</span>&nbsp;<a href="search.do?query=${query}&filter=filter.name.asc"><img src="img/down.gif" align="middle" height="16" width="16"></img></a>
									<a href="search.do?query=${query}&filter=filter.name.desc"><img src="img/up.gif" align="middle"  height="16" width="16"></img></a></th>
		<th align="center"><span style="vertical-align:middle;">Edition</span>&nbsp;<a href="#"><img src="img/down.gif" align="middle" height="16" width="16"></img></a>
									<a href="#"><img src="img/up.gif" align="middle"  height="16" width="16"></img></a></th>
		<th align="center"><span style="vertical-align:middle;">buy</span>&nbsp;<a href="#"><img src="img/down.gif" align="middle" height="16" width="16"></img></a>
									<a href="#"><img src="img/up.gif" align="middle"  height="16" width="16"></img></a>
		</th>
		<th align="center"><span style="vertical-align:middle;">sell</span>&nbsp;
		<a href="#"><img src="img/down.gif" align="middle" height="16" width="16"></img></a>
									<a href="#"><img src="img/up.gif" align="middle"  height="16" width="16"></img></a>
		</th>
	</tr>
	<c:forEach var="card" items="${cards}" varStatus="s">
		<c:if test="${s.index < 25}">
			<tr>
				<td><a href="cardInfo.do?cardId=${card.idCard }"
					rel="shadowbox;height=600;width=800"> <c:out
					value="${card.name}" /> </a></td>
				<td><c:out value="${card.edition}" /></td>
				<td align="right"><c:out
					value="${card.latestPricedata.buyPrice}" /></td>
				<td align="right"><c:out
					value="${card.latestPricedata.sellPrice}" /></td>
			</tr>
		</c:if>
	</c:forEach>
	
</table>
<br/>
<div id="pager" align="center">
	<a href="search.do?query=${query}&page=${page-1}&filter=${filter}"><img src="img/bluearrowleftfree.jpg">&nbsp;</img></a>
	<span style="vertical-align: middle;">${page+1}</span>
	<a href="search.do?query=${query}&page=${page+1}&filter=${filter}">&nbsp;<img src="img/bluearrowrightfree.jpg"></img></a>
</div>



<%@ include file="/WEB-INF/jsp/html_end.jsp"%>
